package com.example.fastmybatis.service.impl;

import com.example.fastmybatis.dao.TUserMapper;
import com.example.fastmybatis.entity.TUser;
import com.example.fastmybatis.service.TUserService;
import com.gitee.fastmybatis.core.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service(value = "userService2")
public class TUserService2Impl implements TUserService {

    @Autowired
    TUserMapper userMapper;
    @Override
    public int addUser(TUser user) {
        return userMapper.addUserForMybatis(user);
    }

    @Override
    public int deleteUser(int id) {
        return userMapper.deleteUserForMybatis(id);
    }

    @Override
    public int updateUser(TUser user) {
        return userMapper.updateUserForMybatis(user);
    }

    @Override
    public int updateUser(Map<String, Object> user) {
        return userMapper.updateUserForMybatis(user);
    }

    @Override
    public TUser getUser(int id) {
        return userMapper.getUserForMybatis(id);
    }

    @Override
    public int addUsers(List<TUser> users) {
        return 0;
    }

    @Override
    public Map<String, Object> getPageResult(int pageIndex, int pageSize) {
        return null;
    }

    @Override
    public PageInfo<TUser> getPageUsers(int pageIndex, int pageSize) {
        return null;
    }

    @Override
    public List<TUser> getUsersForOrder() {
        return userMapper.getUsersForOrder();
    }
}
